Skip to content

docs: update v1.18 documentation - #192

Merged
hwbrzzl merged 35 commits into
masterfrom
bowen/v1.18
Jul 5, 2026
Merged

docs: update v1.18 documentation#192
hwbrzzl merged 35 commits into
masterfrom
bowen/v1.18

Conversation

@goravel-coder

Copy link
Copy Markdown
Contributor

Summary

  • Documents the v1.18 upgrade path and feature introductions for validation, collections, maintenance mode, build generation, ORM query context, package import aliases, and console tables.
  • Adds user-facing guidance for JWT guard mismatch handling and multiple-guard token parsing.
  • Adds sidebar entries so the new collections and v1.18 upgrade docs are discoverable.

Why

These docs align the English site with the v1.18 framework changes and give users one place to understand migration requirements and new APIs.

The validation examples show the new map[string]any rule format and string-slice rule values for regex patterns that contain pipes.

validator, err := ctx.Request().Validate(map[string]any{
	"title": "required|string|max:255",
	"slug":  []string{"required", "regex:^(news|docs)-[a-z]+$", "string"},
})
if err != nil {
	return ctx.Response().Json(http.StatusBadRequest, http.Json{"message": err.Error()})
}
if validator.Fails() {
	return ctx.Response().Json(http.StatusBadRequest, http.Json{"message": validator.Errors().All()})
}
validated := validator.Validated()
return ctx.Response().Success().Json(http.Json{"post": validated})

Comment thread en/upgrade/v1.18.md Outdated
hwbrzzl pushed a commit to goravel/example that referenced this pull request Jun 19, 2026
Adds TestGrpcCredentials to the existing grpc feature suite, exercising
the WithGrpcServerCredentials / WithGrpcClientCredentials surface
documented at goravel/docs#192:

  - TLS round-trip via a per-case in-process *grpc.Server with
    grpc.Creds(serverCreds), driven from the same facade that
    production code uses. Asserts the response via protobufproto.Equal
    (protojson's whitespace format has been observed to vary between
    invocations on the same source).

  - Fallback to insecure when the server entry omits ,
    matching the v1.17 backward-compat path.

  - Warning + insecure fallback when the config references an
    unregistered credentials group, captured via color.CaptureOutput.

  - Silent insecure fallback when groups are registered but the config
    key is empty, distinct from the unknown-group path above.

  - Per-key overwrite of ClientCredentials registrations, verified by
    standing up two unrelated CA/server pairs and pointing the client
    at the second one. If the first registration won, the handshake
    against the second server would fail with a cert verify error.

The running app's gRPC server is already frozen by the time the suite
runs (routes/grpc.go calls facades.Grpc().Server() to register the
UserService, which seeds the server singleton), and ServerCredentials
is silently dropped once the server has been built. The per-case
in-process *grpc.Server is the smallest change that still exercises
the real client-side resolveClientCredentials wiring through the
example's bootstrap.

A new tests/grpc/certs.go helper generates throwaway CA + localhost
server pairs (mirroring tests/telemetry/certs.go), with two
independent calls producing two unrelated trust chains so the
overwrite test can detect which registration wins.
hwbrzzl pushed a commit to goravel/example that referenced this pull request Jun 20, 2026
Adds TestGrpcCredentials to the existing grpc feature suite, covering
the client side of the gRPC transport credentials surface documented at
goravel/docs#192:

  - Insecure fallback when the server entry omits `credentials`,
    matching the v1.17 backward-compat path.
  - Warning + insecure fallback when the config references an
    unregistered credentials group, captured via color.CaptureOutput.
  - Silent insecure fallback when groups are registered but the config
    key is empty, distinct from the unknown-group path above.

The server side (WithGrpcServerCredentials) is out of scope: the running
app's gRPC server is already frozen by the time the suite runs
(routes/grpc.go calls facades.Grpc().Server() to register the
UserService, which seeds the server singleton, and the framework has no
path to reset the frozen server), and the framework's app construction
helpers (foundation.NewApplication, foundation.Setup().Create,
app.Boot) either skip the gRPC provider or run the artisan/runner
pipeline that races the test. Covering the server side would require
a separate goravel/framework change to expose a server-reset path; that
is tracked separately.

The three remaining cases use the singleton's running insecure server
on 127.0.0.1:3002, so they exercise the real resolveClientCredentials
resolver rather than a stub.
hwbrzzl and others added 11 commits June 20, 2026 22:13
Document that the Tracer and Meter argument is the instrumentation scope name
that identifies the code producing the span or metric, recorded as
otel.scope.name. Covers the Tracing and Metrics sections and the v1.18 upgrade
example, answering what the "app" argument means.
@hwbrzzl
hwbrzzl merged commit 17b076d into master Jul 5, 2026
@hwbrzzl
hwbrzzl deleted the bowen/v1.18 branch July 5, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants